package org.example.pojo;

public class Student {
    private String name="张三";
    private int age=18;
    public Student(){
        System.out.println("Student()");
    }
    public Student(String name,int age){
        System.out.println("Student(String name,int age)");
        this.name=name;
        this.age=age;
    }
    public void eat(){
        System.out.println("Student.eat()");
    }
    private void sleep(){
        System.out.println("Student.sleep()");
    }
    public void function(String str){
        System.out.println(str);
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
